Don't loop forever here, even if the only focusable widgets are labels.
authorMatthias Clasen <mclasen@redhat.com>
Thu, 20 Jan 2005 19:53:58 +0000 (19:53 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 20 Jan 2005 19:53:58 +0000 (19:53 +0000)
2005-01-20  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkdialog.c (gtk_dialog_map): Don't loop forever
here, even if the only focusable widgets are labels.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtkdialog.c

index abf62c77e631ba23c8645c789767d2e4a15f9efb..1eba5e4c77c32408ea8cff5d5da402747af83b7c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-20  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkdialog.c (gtk_dialog_map): Don't loop forever
+       here, even if the only focusable widgets are labels.
+
 2005-01-20  Matthias Clasen  <mclasen@redhat.com>
 
        Support tinting in GtkCellRendererPixbuf (#162903, Jorn Baayen):
index abf62c77e631ba23c8645c789767d2e4a15f9efb..1eba5e4c77c32408ea8cff5d5da402747af83b7c 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-20  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkdialog.c (gtk_dialog_map): Don't loop forever
+       here, even if the only focusable widgets are labels.
+
 2005-01-20  Matthias Clasen  <mclasen@redhat.com>
 
        Support tinting in GtkCellRendererPixbuf (#162903, Jorn Baayen):
index abf62c77e631ba23c8645c789767d2e4a15f9efb..1eba5e4c77c32408ea8cff5d5da402747af83b7c 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-20  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkdialog.c (gtk_dialog_map): Don't loop forever
+       here, even if the only focusable widgets are labels.
+
 2005-01-20  Matthias Clasen  <mclasen@redhat.com>
 
        Support tinting in GtkCellRendererPixbuf (#162903, Jorn Baayen):
index e0effeea8348fdfc73aabc0eeacf471d59da78ee..77191f429342cc4e93c86e76b311365532067f13 100644 (file)
@@ -345,10 +345,16 @@ gtk_dialog_map (GtkWidget *widget)
   if (!window->focus_widget)
     {
       GList *children, *tmp_list;
+      GtkWidget *first_focus = NULL;
       
       do 
        {
          g_signal_emit_by_name (window, "move_focus", GTK_DIR_TAB_FORWARD);
+
+         if (first_focus == NULL)
+           first_focus = window->focus_widget;
+         else if (first_focus == window->focus_widget)
+           break;
        }
       while (GTK_IS_LABEL (window->focus_widget));